package com.Ajava1801D.线程池;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

/**
 * @author: LCG
 * 作者: LCG
 * 日期: 2020/10/6  16:33
 * 描述:
 */
public class TestExecutorsTest {

    public static void main(String[] args) {

        ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(2);

        scheduledExecutorService.scheduleAtFixedRate(new ThreadPoolRunable2(),10,5,TimeUnit.SECONDS);
        //scheduledExecutorService.submit(new ThreadPoolRunable2());



    }

}
